export const sleep = (time: number) => {
  let timer: any = null;
  return new Promise((resolve) => {
    timer = setInterval(() => {
      clearInterval(timer);
      resolve(true);
    }, time);
  });
};
